package cn.dust.design.pattern.behavioral.visitor;

/**
 * @Author: dust
 * @Date: 2019/11/28 19:25
 */
public class Visitor implements IVisitor{

    @Override
    public void visit(FreeCourse freeCourse) {
        System.out.println(freeCourse.getName());
    }

    @Override
    public void visit(CodingCourse codingCourse) {
        System.out.println(codingCourse.getName()+"  "+codingCourse.getPrice());
    }

}
